package sg.edu.iss.club;

public class Person {

	private String surName;
	private String firstName;
	private String secondName;
	
	
	public Person(String surName, String firstName, String secondName) {
		super();
		this.surName = surName;
		this.firstName = firstName;
		this.secondName = secondName;
	}
	
	public String getSurName() {
		return surName;
	}
	public void setSurName(String surName) {
		this.surName = surName;
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getSecondName() {
		return secondName;
	}
	public void setSecondName(String secondName) {
		this.secondName = secondName;
	}	
	
	public String show(){
		String sFullName;
		
		sFullName= getFirstName() ;
		if (getSecondName()!= null)
		{
			sFullName+= getSecondName() ;	
		}
		sFullName+= getSecondName() ;
		return sFullName;
	}
	
	public boolean equals(Person p1){
		if (p1 instanceof Person){
			Person P= (Person) p1;
			return ((P.surName.equals(getSurName()))  && (P.firstName.equals(getFirstName())) &&  (P.secondName.equals(getSecondName()))) ;		
			}
		return false;
	}
	
	
}
